<!DOCTYPE html>
<html lang="en">

	<script>
		var _hmt = _hmt || [];
		(function() {
			var hm = document.createElement("script");
			hm.src = "https://hm.baidu.com/hm.js?bf515042093c3de99a0ba28c661b07b4";
			var s = document.getElementsByTagName("script")[0];
			s.parentNode.insertBefore(hm, s);
		})();
	</script>

	<head>
		<meta charset="UTF-8">
		<title>formSelects 基于layui的多选解决方案</title>
		<meta name="description" content="基于layui的多选解决方案">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
		<link type="image/x-icon" rel="shortcut icon" href="public/fs.png">
		<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
		<link rel="stylesheet" type="text/css" href="public/docsify/vue.css">
		<link rel="stylesheet" type="text/css" href="public/SyntaxHighlighter-3.0.83/shCore.css"/>
		<link rel="stylesheet" type="text/css" href="public/SyntaxHighlighter-3.0.83/shThemeFadeToGrey.css"/>
		<link rel="stylesheet" type="text/css" href="public/runCode/runCode.css"/>
		<link rel="stylesheet" type="text/css" href="public/index.css" />
		
		<script src="public/jquery-v3.2.1.js" type="text/javascript" charset="utf-8"></script>
		<link href="../dist/formSelects-v4.css" rel="stylesheet" type="text/css" />
		<script src="../dist/formSelects-v4.js" type="text/javascript" charset="utf-8"></script>
	</head>

	<body>

		<nav>
			<a href="#/">使用指南</a>
			<a href="#/module/study">学习交流</a>
			<a href="#/module/money">打赏赞助</a>
		</nav>

		<div id="app">加载中</div>
		<div id="runcode-content"></div>

		<script>
			window.$docsify = {
				name: 'FormSelects',
				repo: 'hnzzmsf/layui-formSelects',
				logo: 'public/logo.png',
				//          basePath: '/layui-formSelects-site/docs',
				basePath: '/layui-formSelects/docs',
				loadSidebar: true,
				subMaxLevel: 2,
				autoHeader: true,
				executeScript: true,
				alias: {
					'/module/_sidebar.md': '/sidebar.md',
					'/module2/_sidebar.md': '/sidebar.md',
					'/module3/_sidebar.md': '/sidebar.md',
					'/_sidebar.md': '/sidebar.md',
				},
			}
		</script>
		<script src="public/docsify/docsify.min.js"></script>
		<script src="public/docsify/external-script.min.js"></script>
		<script src="public/docsify/zoom-image.js"></script>
		<script src="public/docsify/prism-javascript.min.js"></script>
		<script src="public/docsify/prism-css.min.js"></script>
		
		<script src="public/SyntaxHighlighter-3.0.83/shCore.js" type="text/javascript" charset="utf-8"></script>
		<script src="public/SyntaxHighlighter-3.0.83/shAllHtml.js" type="text/javascript" charset="utf-8"></script>
		<script src="public/runCode/runCode.js" type="text/javascript" charset="utf-8"></script>
		
<noscript id="noscript-head">
<!-- 首先引入css, 和js, 唯一依赖: jQuery -->
<link href="//raw.githack.com/hnzzmsf/layui-formSelects/master/dist/formSelects-v4.css" rel="stylesheet" />
<script src="//unpkg.com/jquery@3.3.1/dist/jquery.min.js"></script>
<script src="//raw.githack.com/hnzzmsf/layui-formSelects/master/dist/formSelects-v4.min.js"></script>

</noscript>

<noscript id="noscript-foot">

<!-- 执行渲染, 把原始select美化~~ -->
<script type="text/javascript">
	formSelects.render('xid');
</script>
</noscript>

<noscript id="noscript-advertising">


<!-- 
 作    者: maplemei, 一个热爱前端的Java程序猿
 联系方式: QQ群. 769620939,QQ. 707200833, WX. faymaplemei 。加好友请备注 formSelects
 打赏赞助: https://hnzzmsf.github.io/layui-formSelects/docs/index.html#/module/money
 
 开源不易, 有问题请多多包涵
 -->
</noscript>

		
		<script type="text/javascript">
// 			var clearId = -1;
// 			$(document).on('DOMNodeInserted', function(e) {
// 				clearTimeout(clearId);
// 				clearId = setTimeout(function() {
// 					$('select[xm-select]').each(function(index, select) {
// 						var xid = select.getAttribute('xm-select');
// 						formSelects.render(xid);
// 					});
// 				}, 100);
// 			});
			
			var scrollTop,
				checkHeadStr = '//raw.githack.com/hnzzmsf/layui-formSelects/master/dist/formSelects-v4.css',
				addHead = $('#noscript-head').html().replace(/&lt;/g, '<').replace(/&gt;/g, '>'),
				checkFootStr = 'formSelects.render',
				addFoot = $('#noscript-foot').html().replace(/&lt;/g, '<').replace(/&gt;/g, '>'),
				addAdvertising = $('#noscript-advertising').html().replace(/&lt;/g, '<').replace(/&gt;/g, '>');
				;
			$(window).scroll(function(){
				if(scrollTop){
					$(window).scrollTop(scrollTop);
				}
			});
			$(document).on('click', '.runcode', function(e){
				scrollTop = $(window).scrollTop();
				
				var val = $(e.target).prev().text();
				if(val.indexOf(checkHeadStr) == -1){
					val = addHead + val;
				}
				if(val.indexOf(checkFootStr) == -1){
					var xid = /xm-select="([a-zA-Z0-9-_]+)"/.exec(val)[1];
					val = val + addFoot.replace('xid', xid);
				}
				val = val + addAdvertising;
				runCode({}, val, function(){
					scrollTop = null;
				});
			});
		</script>

	</body>

</html>